<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Product-<{:C('site_title')}></title>
<meta name="keywords" content="<{:C('site_keyword')}>">
<meta name="description" content="<{:C('site_content')}>">
<link rel="stylesheet" href="<{:STATICS}>/font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="<{:STATICS}>/css/bootstrap.min.css">
<link rel="stylesheet" href="<{:RES}>/css/style.css" />
<include file="Public:js" />
</head>
<body>

<include file="Public:header" />

<div class="inBanner"><h1>PRODUCT</h1></div>

<div class="mfbox inBox">
	<div class="leftMenu">
		<?php
		foreach ($proMenu as $key => $val1) {
			echo '<li><a href="'.U('Product/index',array('path'=>$val1['path'])).'">'.$val1['name'].'</a>';
			echo '<ul>';
			foreach ($val1['childrens'] as $key => $val2) {
				if ($val2['childrens']) {
					echo '<li class="aa"><a href="javascript:void(0)" onclick="show(this)">'.$val2['name'].'</a>';
				}else{
					echo '<li class="fenlei"><a href="'.U('Product/index',array('cateID'=>$val2['id'])).'">'.$val2['name'].'</a>';
				}				
				echo '<ul style="display:none">';
				foreach ($val2['childrens'] as $key => $val3) {
					if($cateID==$val3['id']){
						echo '<li class="active">';
					}else{
						echo '<li>';
					}
					if ($val3['childrens']) {
						echo '<a href="javascript:void(0)" onclick="show(this)">'.$val3['name'].'</a>';
					}else{
						echo '<a href="'.U('Product/index',array('cateID'=>$val3['id'])).'">'.$val3['name'].'</a>';
					}
					echo '<ul style="display:none">';
					foreach ($val3['childrens'] as $key => $val4) {
						if($cateID==$val4['id']){
							echo '<li class="active">';
						}else{
							echo '<li>';
						}
						echo '<a href="'.U('Product/index',array('cateID'=>$val4['id'])).'">'.$val4['name'].'</a>';
						echo '</li>';
					}
					echo '</ul>';
					echo '</li>';
				}
				echo '</ul>';
				echo '</li>';
			}
			echo '</ul>';
			echo '</li>';
		}
		?>
	</div>

	<div class="productList">
		<empty name="list">
		<div class="null"><img src="<{:RES}>/image/null_data.jpg" alt=""></div>
		<else/>
		<div class="list">
			<volist name="list" id="vo">
			<li><a href="<{:U('Product/detail',array('id'=>$vo['id']))}>"><img src="<{$vo.image}>" alt="<{$vo.name}>"><p><{$vo.name}></p></a></li>
			</volist>
		</div>
		</empty>

		<div class="page">
			<nav>
					<ul class="pagination"><{$page}></ul>
				</nav>
			</div>
	</div>
</div>
<script>
function show(obj){
	var $ul = $(obj).next("ul");
	if($ul.is(':visible')){
		$ul.stop().slideUp();
	}else{
		$ul.stop().slideDown();
	}
}
$(function(){
	li = $(".leftMenu li.active");
	li.parent("ul").show();
	li.parent().parent().parent("ul").show();
	 $("#aa a").click(function(){
  $(this).addClass("on").siblings().removeClass("on");
  alert('22');
  $("#previewer").css("color",$(this).css("background-color"))
 });

})
</script>


<include file="Public:footer" />
</div>      
</body>
</html>